<?php

/**
 * 路由
 */
use app\middleware\PermissionMiddleware;
use think\facade\Route;
//测试地址
Route::any('index/index','index/index');

//未找到路由地址
Route::miss('publics/notfound');

//验证码模块
Route::get('login/captcha', 'login/captcha');

Route::group('login',function () {
    Route::post('login', 'login/login');
    Route::post('wms_login', 'login/wms_login');
 });
//后台首页tms
Route::group('index',function () {
    Route::post('indexdata', 'index/indexdata');
    Route::post('test1226','index/test1226');
    Route::post('uinfo', 'partneruser/uinfo');
    Route::post('platforminfo', 'partneruser/platforminfo');
})->middleware([\app\middleware\TokenWms::class]);

Route::group('delivery',function () {
    Route::post('lists', 'Delivery/lists');
    Route::post('order_lists', 'Delivery/order_lists');
//});
})->middleware([\app\middleware\TokenWms::class]);

//tms 账单列表
Route::group('bill_management',function () {
    Route::post('lists', 'XlBillManagement/lists');
    Route::post('test','XlBillManagement/test');
    Route::post('add', 'XlBillManagement/add');
    Route::post('modify', 'XlBillManagement/modify');
    Route::post('del', 'XlBillManagement/del');
    Route::post('car_number', 'XlBillManagement/getCarNumberList');
})->middleware([\app\middleware\TokenWms::class]);


//后台首页wms
Route::group('index',function () {
    Route::post('indexdata', 'index/indexdata');
    Route::post('uinfowms', 'partneruser/uinfowms');
    Route::post('platforminfo', 'partneruser/platforminfo');
    Route::post('test1', 'index/test1');
})->middleware([\app\middleware\TokenWms::class]);

 //退出
Route::group('users',function () {
    Route::post('logout', 'user/logout');

//});
})->middleware([\app\middleware\TokenWms::class]);
//上传图片
Route::group('personal',function () {
    Route::post('uploadimg', 'user/uploadimg');
});

//合作商用户组
Route::group('partneruser',function (){
    Route::post('user_lists', 'partneruser/user_lists');
    Route::post('add_user', 'partneruser/add_user');
    Route::post('modify_user', 'partneruser/modify_user');
    Route::post('del_user', 'partneruser/del_user');
})->middleware([\app\middleware\TokenWms::class]);

//合作商用户角色
Route::group('role',function (){
    Route::post('lists', 'partnerrole/lists');
    Route::post('add_role', 'partnerrole/add_role');
    Route::post('modify_role', 'partnerrole/modify_role');
    Route::post('del_role', 'partnerrole/del_role');

})->middleware([\app\middleware\TokenWms::class]);

//合作商权限组 tms
Route::group('permission',function (){
    Route::post('permission_list', 'permission/permission_list');
    Route::post('role_list', 'permission/role_list');
    Route::post('add_permission', 'permission/add_permission');
    Route::post('modify_permission', 'permission/modify_permission');
    Route::post('del_permission','permission/del_permission');
    Route::post('log','permission/log');
})->middleware([\app\middleware\TokenWms::class]);


//合作商权限组wms
Route::group('permission',function (){
    Route::post('permission_listwms', 'permission/permission_listwms');
    Route::post('role_listwms', 'permission/role_listwms');
    Route::post('add_permissionwms', 'permission/add_permissionwms');
    Route::post('modify_permissionwms', 'permission/modify_permissionwms');
    Route::post('del_permissionwms','permission/del_permissionwms');
    Route::post('log','permission/log');
})->middleware([\app\middleware\TokenWms::class]);

//合作商菜单组
Route::post('menu/havePermissionMenu', 'menu/havePermissionMenu');

//合作商菜单组
Route::post('region/region_list', 'region/region_list');


//仓库模块
Route::group('warehouse',function (){
    Route::post('info', 'warehouse/info');
    Route::post('add', 'warehouse/add');
    Route::post('modify', 'warehouse/modify');
    Route::post('del', 'warehouse/del');
    Route::post('lists', 'warehouse/lists');
})->middleware([\app\middleware\TokenWms::class]);




//网点模块
Route::group('networks',function (){
    Route::post('info', 'networks/info');
    Route::post('add', 'networks/add');
    Route::post('modify', 'networks/modify');
    Route::post('del', 'networks/del');
    Route::post('lists', 'networks/lists');
})->middleware([\app\middleware\TokenWms::class]);

//网点业务模块
Route::group('networks_bussiness',function (){
//    Route::post('info', 'networkbussiness/info');
    Route::post('add', 'networkbussiness/add');
    Route::post('modify', 'networkbussiness/modify');
    Route::post('del', 'networkbussiness/del');
    Route::post('lists', 'networkbussiness/lists');
});//->middleware([\app\middleware\TokenWms::class]);

//车辆模块
Route::group('car',function (){
    Route::post('info', 'car/info');
     Route::post('add', 'car/add');
    Route::post('modify', 'car/modify');
    Route::post('del', 'car/del');
    Route::post('lists', 'car/lists');
    Route::post('car_oper', 'car/carOper');
});//->middleware([\app\middleware\TokenWms::class]);


//司机模块
Route::group('driver',function (){
    Route::post('add', 'driver/add');
    Route::post('modify', 'driver/modify');
    Route::post('del', 'driver/del');
    Route::post('lists', 'driver/lists');
    Route::post('attendance_lists','driver/attendance_lists');
    Route::post('work_recode','driver/workRecode');
    Route::post('income_lists','driver/income_lists');
})->middleware([\app\middleware\TokenWms::class]);

//线路模块
Route::group('line',function (){
    Route::post('add', 'line/add');
    Route::post('modify', 'line/modify');
    Route::post('del', 'line/del');
    Route::post('lists', 'line/lists');
    Route::post('line_data','line/line_data');
})->middleware([\app\middleware\TokenWms::class]);

//任务模块
Route::group('task',function (){
    Route::post('add', 'line/add');
    Route::post('modify', 'line/modify');
    Route::post('del', 'line/del');
    Route::post('lists', 'task/lists');
    Route::post('detail', 'task/detail');
    Route::post('details', 'task/details');
    Route::post('distribution', 'task/distribution');
    Route::post('modify_driver','task/modify_driver');
    Route::post('line_list','task/lineList');
    Route::post('map_info','task/mapInfo');
    Route::post('route_details','task/routeDetails');
    Route::post('run_track','task/runTrack');
    Route::post('exportByMonth','task/exportByMonth');
    Route::post('modify_remarks','task/modify_remarks');
    Route::post('review_abnormal','task/review_abnormal');
})->middleware([\app\middleware\TokenWms::class]);

//wms仓库模块
Route::group('wmswarehouse',function (){
    Route::post('info', 'WmsWarehouse/info');
    Route::post('add', 'WmsWarehouse/add');
    Route::post('modify', 'WmsWarehouse/modify');
    Route::post('del', 'WmsWarehouse/del');
    Route::post('lists', 'WmsWarehouse/lists');
    Route::post('add_admin','WmsWarehouse/add_admin');
    Route::post('admin_lists','WmsWarehouse/admin_lists');
    Route::post('modify_admin','WmsWarehouse/modify_admin');
    Route::post('del_admin','WmsWarehouse/del_admin');
    Route::post('attr_list','WmsWarehouse/lists');
    Route::post('add_attr','WmsWarehouse/add');
    Route::post('modify_attr','WmsWarehouse/modify');
    Route::post('del_attr','WmsWarehouse/del');
})->middleware([\app\middleware\TokenWms::class]);


//wms基础资料
Route::group('wmscustomer',function (){
    Route::post('lists', 'wmscustomer/lists');
    Route::post('add', 'wmscustomer/add');
    Route::post('modify', 'wmscustomer/modify');
    Route::post('del', 'wmscustomer/del');
})->middleware([\app\middleware\TokenWms::class]);


//wms基础资料-供应商
Route::group('wmsprovider',function (){
    Route::post('lists', 'wmsprovider/lists');
    Route::post('add', 'wmsprovider/add');
    Route::post('modify', 'wmsprovider/modify');
    Route::post('del', 'wmsprovider/del');
})->middleware([\app\middleware\TokenWms::class]);

